package com.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;
@Data
@NoArgsConstructor()
@TableName("product")
public class Product extends BaseBean{
    //CREATE TABLE product (
    //    id INT PRIMARY KEY AUTO_INCREMENT COMMENT 'ID',
    //    category VARCHAR(39) NOT NULL COMMENT '分类',
    //    brand VARCHAR(39) COMMENT '品牌',
    //    title VARCHAR(255) NOT NULL COMMENT '商品标题',
    //    description TEXT COMMENT '商品描述',
    //    is_active TINYINT(1) NOT NULL DEFAULT 1 COMMENT '上架状态',
    //    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    //    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
    //) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
    @TableId(type= IdType.AUTO)
    private Integer id;

    private String name;

    private BigDecimal price;

    private String category;

    private String brand;

    private String title;

    private String description;
    @TableField("is_active")
    private  int is_active;



}
